package io.geekidea.springbootplus.system.service;

import io.geekidea.springbootplus.system.entity.Admin;
import io.geekidea.springbootplus.system.param.AdminPageParam;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

/**
 *  服务类
 *
 * @author miko
 * @since 2020-10-10
 */
public interface AdminService extends BaseService<Admin> {

    /**
     * 保存
     *
     * @param admin
     * @return
     * @throws Exception
     */
    boolean saveAdmin(Admin admin) throws Exception;

    /**
     * 修改
     *
     * @param admin
     * @return
     * @throws Exception
     */
    boolean updateAdmin(Admin admin) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteAdmin(Long id) throws Exception;


    /**
     * 获取分页对象
     *
     * @param adminQueryParam
     * @return
     * @throws Exception
     */
    Paging<Admin> getAdminPageList(AdminPageParam adminPageParam) throws Exception;

}
